//
//  AppConfig.h
//  GuangRi
//
//  Created by ZouJianMing on 2017/2/10.
//
//
//

#pragma mark
#pragma mark - Keys

#define DidKeysNeedEbg    NO

#define ShareSDKAppKey          [NSString infoByKey:@"ShareSDKAppKey" NeedEbg:DidKeysNeedEbg]
#define ShareSDKAppSecret       [NSString infoByKey:@"ShareSDKAppSecret" NeedEbg:DidKeysNeedEbg]
#define SinaWeiboAppKey         [NSString infoByKey:@"SinaWeiboAppKey" NeedEbg:DidKeysNeedEbg]
#define SinaWeiboAppSecret      [NSString infoByKey:@"SinaWeiboAppSecret" NeedEbg:DidKeysNeedEbg]
#define WXAppID                 [NSString infoByKey:@"WXAppID" NeedEbg:DidKeysNeedEbg]
#define WXAppSecret             [NSString infoByKey:@"WXAppSecret" NeedEbg:DidKeysNeedEbg]
#define TencentAppID            [NSString infoByKey:@"TencentAppID" NeedEbg:DidKeysNeedEbg]
#define TencentAppKey           [NSString infoByKey:@"TencentAppKey" NeedEbg:DidKeysNeedEbg]
#define AVOSCloudAppID          [NSString infoByKey:@"AVOSCloudAppID" NeedEbg:DidKeysNeedEbg]
#define AVOSCloudAppKey         [NSString infoByKey:@"AVOSCloudAppKey" NeedEbg:DidKeysNeedEbg]
#define BuglyAppId              [NSString infoByKey:@"BuglyAppId" NeedEbg:DidKeysNeedEbg]

#define TopHeight [UIApplication sharedApplication].statusBarFrame.size.height + self.navigationController.navigationBar.height
//应用最终上线的bundleID
#define FinalBundleID  @"com.guangri.iphone"
#define FinalBundleIDPad @"com.guangri.ipad"
#define kDelayTime  0.3

#define kDefaultRedColor RGB(253, 76, 91)
#define kDefaultBlackColor RGB(51, 51, 51)
#define kDefaultLightGrayColor RGB(238, 238, 238)

#pragma mark - 网络情况
#define API_SUCCESS    @"success"
#define API_STATUS   @"status"
#define API_DATA   @"data"

#pragma mark - default
#define kGlobalPushKey @"globalPush"
#define kPushChannels @"channels"
#define kQiniuHost @"kQiniuHost"
#define kCommentNumber @"kCommentNumber"
#define kAboutApp @"kAboutApp"
#define kShowGuide @"ShowGuide_%@"

#define kDefaultAvater [UIImage imageNamed:@"icon_default_header"]

#define kUserShouldLoginAgainNotification       @"kUserShouldLoginAgainNotification"
#define kReloadProductDetailDataNotification    @"kReloadProductDetailDataNotification"
#define kSelectedTabbarNotification             @"kSelectedTabbarNotification"
#define kSelectedTabbarItemNotification         @"kSelectedTabbarItemNotification"
#define kHiddenTabbarNotification               @"kHiddenTabbarNotification"
#define kShowTabbarNotification                 @"kShowTabbarNotification"
#define kHiddenLoginButtonNotification          @"kHiddenLoginButtonNotification"
#define kModifyUserInfoNotification             @"kModifyUserInfoNotification"
#define kLoginSuccessNotification               @"kLoginSuccessNotification"
#define kDeleteMessageNotification              @"kDeleteMessageNotification"
#define kUpdateMessageNotification              @"kUpdateMessageNotification"
#define kUpdateCollecteNotification             @"kUpdateCollecteNotification"
#define kUpdateUnReadNumNotification            @"kUpdateUnReadNumNotification"
#define kDeleteNoExistNotification              @"kDeleteNoExistNotification"

#define kFirstLoadDataNotification              @"kFirstLoadDataNotification"

typedef NS_ENUM(NSInteger, GRLoginType) {
    GRLoginTypeTabbar,
    GRLoginTypeOther
};

typedef NS_ENUM(NSInteger, GRWebViewType) {
    GRWebViewTypeNone,
    GRWebViewShare,
    GRWebViewDelete,
    GRWebViewSharePDF
};

typedef NS_ENUM(NSInteger, GRRegisterWithResetpasswordType)
{
    GRRegisterWithResetpasswordTypeRegister,
    GRRegisterWithResetpasswordTypeSetPassword
};

typedef void (^resultBlock)(id result, NSError *error);
typedef void (^progressBlock)(float result);
typedef void (^resultWithPageBlock)(id result, id pageModel, NSError *error);
